load("//:build_variables.bzl", "COPTS")
load("//tools/lint:linters.bzl", "clang_tidy_test")

package(
    default_visibility = ["//:android_cuttlefish"],
)

cc_library(
    name = "screen_connector_common",
    srcs = [
        "screen_connector_common.cc",
    ],
    hdrs = [
        "screen_connector_common.h",
    ],
    copts = COPTS,
    strip_include_prefix = "//cuttlefish",
    deps = [
        "//cuttlefish/common/libs/utils:size_utils",
        "//cuttlefish/host/libs/config:cuttlefish_config",
        "//libbase",
    ],
)

clang_tidy_test(
    name = "screen_connector_common_clang_tidy",
    srcs = [":screen_connector_common"],
    tags = [
        "clang-tidy",
        "clang_tidy",
    ],
)

cc_library(
    name = "video_frame_buffer",
    hdrs = [
        "video_frame_buffer.h",
    ],
    copts = COPTS,
    strip_include_prefix = "//cuttlefish",
)

cc_library(
    name = "screen_connector",
    srcs = [
        "composition_manager.cpp",
        "ring_buffer_manager.cpp",
        "wayland_screen_connector.cpp",
    ],
    hdrs = [
        "composition_manager.h",
        "ring_buffer_manager.h",
        "screen_connector.h",
        "screen_connector_common.h",
        "screen_connector_ctrl.h",
        "screen_connector_multiplexer.h",
        "screen_connector_queue.h",
        "wayland_screen_connector.h",
    ],
    copts = COPTS,
    strip_include_prefix = "//cuttlefish",
    deps = [
        ":screen_connector_common",
        ":video_frame_buffer",
        "//cuttlefish/common/libs/concurrency",
        "//cuttlefish/common/libs/confui",
        "//cuttlefish/common/libs/fs",
        "//cuttlefish/common/libs/utils:contains",
        "//cuttlefish/common/libs/utils:result",
        "//cuttlefish/common/libs/utils:size_utils",
        "//cuttlefish/host/libs/config:config_constants",
        "//cuttlefish/host/libs/config:cuttlefish_config",
        "//cuttlefish/host/libs/confui:host_confui",
        "//cuttlefish/host/libs/wayland:cuttlefish_wayland_server",
        "//libbase",
        "@fruit",
        "@libdrm//:libdrm_fourcc",
        "@libyuv",
    ],
)

clang_tidy_test(
    name = "screen_connector_clang_tidy",
    srcs = [":screen_connector"],
    tags = [
        "clang-tidy",
        "clang_tidy",
    ],
)
